package com.woniuxy.controller;

import com.woniuxy.entitys.TbCustomer;
import com.woniuxy.service.RegisterService;
import com.woniuxy.service.impl.RegisterServiceImpl;
import com.woniuxy.utils.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wu
 * @date 2024/01/16 18:13:26
 */
@RestController
public class RegisterController {
    @Autowired
    private RegisterService registerService;
    @PostMapping("/auth/register")
    public ResultVO register(@RequestBody TbCustomer tbCustomer){

        int count =  registerService.register(tbCustomer);
        return count>0?ResultVO.success("注册成功"):ResultVO.failure("注册失败");
    }
}
